// @require './config'

$mobileSidebarWidth = $sidebarWidth * 0.82

// narrow desktop / iPad
@media (max-width: $MQNarrow)
  .sidebar
    font-size 15px
    width $mobileSidebarWidth
  .page, .password-wrapper-in
    margin-left .8rem
  .sidebar-open
    // margin-left $mobileSidebarWidth
    .page
      padding-left .8rem !important

// wide mobile
@media (max-width: $MQMobile)
  .sidebar
    top 0
    padding-top $navbarHeight
    transform translateX(-100%)
    transition transform .2s ease
  .page, .password-wrapper-in
    margin-left 0
  .theme-container
    &.sidebar-open
      .sidebar
        transform translateX(0)
    &.no-navbar
      .sidebar
        padding-top: 0
  .password-shadow
    padding-left 0

// narrow mobile
@media (max-width: $MQMobileNarrow)
  h1
    font-size 1.5rem
  .content__default
    div[class*="language-"]
      width: 100%
      border-radius 0

// 侧边栏显示隐藏的适配
@media (min-width: ($MQMobile + 1px)) // 720px
  .theme-container 
    &.sidebar-open
      .sidebar-mask
        display: none
      .sidebar
        transform translateX(0)
      .sidebar-button
        left $sidebarWidth
      .page
        padding-left ($sidebarWidth + .8rem)
        padding-right .8rem
    &.have-rightmenu
      .page
        padding-right ($rightMenuWidth + .8rem)
    &.no-sidebar
      .page
        padding-left 0!important
  @media (max-width: $MQNarrow)
    .theme-container
      &.sidebar-open:not(.on-sidebar)
        .sidebar-button
          $mobileSidebarWidth = $sidebarWidth * 0.7
          left $mobileSidebarWidth
  .theme-container.no-sidebar
    .sidebar-button
      display none